<Slider x:Class="WozLib.UI.Controls.AlphaSlider"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Orientation="Vertical"
    x:Name="_AlphaSlider"
    >
  <Slider.Template>
    <ControlTemplate TargetType="{x:Type Slider}">
      <Border x:Name="Border">
        <Grid x:Name="Grid">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding MinWidth}"/>
            <ColumnDefinition Width="Auto"/>
          </Grid.ColumnDefinitions>
          <Grid Width="10" Cursor="SizeNS" MouseDown="ColorSlider_MouseDown" Margin="0,5,0,5" Grid.Column="1">
            <Grid.Background>
              <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                <LinearGradientBrush.GradientStops>
                  <GradientStop Offset="0" Color="{Binding Path=InternalBaseColor, ElementName=_AlphaSlider, Mode=OneWay}"/>
                  <GradientStop Offset="1" Color="{Binding Path=InternalEndColor, ElementName=_AlphaSlider, Mode=OneWay}"/>
                </LinearGradientBrush.GradientStops>
              </LinearGradientBrush>
            </Grid.Background>
          </Grid>

          <Track x:Name="PART_Track" Grid.Column="1">
            <Track.Thumb>
              <Thumb x:Name="Thumb">
                <Thumb.Style>
                  <Style TargetType="{x:Type Thumb}">
                    <Setter Property="OverridesDefaultStyle" Value="True"/>
                    <Setter Property="Width" Value="22"/>
                    <Setter Property="Height" Value="11"/>
                    <Setter Property="Template">
                      <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Thumb}">
                          <Viewbox Stretch="Fill">
                            <Path Fill="Black">
                              <Path.Data>
                                <CombinedGeometry>
                                  <CombinedGeometry.Geometry1>
                                    <PathGeometry>
                                      <PathGeometry.Figures>
                                        <PathFigure StartPoint="0,0" IsClosed="True">
                                          <LineSegment Point="100,40" />
                                          <LineSegment Point="0,80" />
                                        </PathFigure>
                                      </PathGeometry.Figures>
                                    </PathGeometry>
                                  </CombinedGeometry.Geometry1>
                                  <CombinedGeometry.Geometry2>
                                    <PathGeometry>
                                      <PathGeometry.Figures>
                                        <PathFigure StartPoint="200,0" IsClosed="True">
                                          <LineSegment Point="100,40" />
                                          <LineSegment Point="200,80" />
                                        </PathFigure>
                                      </PathGeometry.Figures>
                                    </PathGeometry>
                                  </CombinedGeometry.Geometry2>
                                </CombinedGeometry>

                              </Path.Data>
                            </Path>
                          </Viewbox>

                          <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                              <Setter Property="Cursor" Value="SizeNS" />
                            </Trigger>
                          </ControlTemplate.Triggers>
                        </ControlTemplate>
                      </Setter.Value>
                    </Setter>
                  </Style>
                </Thumb.Style>
              </Thumb>
            </Track.Thumb>
          </Track>
        </Grid>
      </Border>
    </ControlTemplate>
    </Slider.Template>
  </Slider>
